
const useBaseStore = defineStore(
    'base',
    {
        state: () => ({
            isGisPage : false,
            showLeftViewStatus: 1,
            leftExpanded: true
        }),

        actions: {
            changeHomePage(isGis) {
                this.isGisPage = isGis
            },

            async changeOverView(index) {
                await new Promise((resolve) => setTimeout(resolve, 100));
                this.leftExpanded = false;
                this.showLeftViewStatus = index;
              
                await new Promise((resolve) => setTimeout(resolve, 100));
                this.leftExpanded = true;
              },

              toggleLeftExpand(show) {
                this.leftExpanded = show ?? !this.leftExpanded;
            },
        }
    }
)

export default useBaseStore
